package com.cq.mapper;

import com.cq.pojo.Reply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 悠久的苍穹
 * @Date: 2021/2/5 19:18
 * @Description: 回复数据层
 * @Version: 1.0
 */
@Mapper
@Repository
public interface ReplyMapper {
    int getCount();

    List<Reply> getReplies(@Param("page") int page, @Param("limit") int limit);

    int getReplyCount(@Param("start") String start, @Param("end") String end);

    List<Reply> getRepliesByTime(@Param("page") int page, @Param("limit") int limit, @Param("start") String start, @Param("end") String end);

    void deleteReplyById(@Param("id") int id);

    int addReply(Reply reply);

    void deleteReplyByTopicId(@Param("topicId") int topicId);
}
